/**
 * 购物车相关
 */
//获取购物车数据
const CART_GET_LIST = "getCartList";
//获取购物车数量
const CART_GET_NUM = "getCartNum";
//派发购物车数据
const CART_SEND_LIST = "sendCartList"
//派发购物车数量
const CART_SEND_NUM = "sendCartNum";
//购物车数据改变
const CART_DATA_CHANGE = "cartDataChange";
//购物车更新产品数量
const CART_CHANGE_NUM = "cartChangeNum";
//购物车选中状态更改
const CART_CHANGE_SELECT = "cartChangeSelect";
//购物车删除产品
const CART_DELETE_ITEM = "cartDeleteItem";
//购物车添加产品
const CART_ADD_ITEM = "cartAddItem";
//第三方购物车添加产品
const CART_ADD_THIRD_ITEM = "cartAddThirdItem";
//第三方购物车数据改变
const CART_THIRD_DATA_CHANGE = "cartThirdDataChange";


/**
 * 用户登陆、注册相关
 */
//使用账号/手机登陆成功
const USER_LOGIN_SUCCESS = "useLoginSuccess";
//使用账号/手机登陆失败
const USER_LOGIN_FAIL = "userLoginFail";
//使用账号/手机登陆成功
const USER_RIGISTER_SUCCESS = "userRigisterSuccess";
//使用账号/手机登陆失败
const USER_RIGISTER_FAIL = "userRigisterFail";
//获取到账号/手机登陆用户的用户信息成功
const USER_GET_LOGIN_INFO_SUCCESS = "userGetLoingInfoSuccess";
//获取到账号/手机登陆用户的用户信息失败
const USER_GET_LOGIN_INFO_FAIL = "userGetLoingInfoFail";
//发送短信成功（其中包含验证验证码的流程）
const USER_CHECK_CODE_SUCCESS = "userCheckCodeSuccess";
//发送短信失败（其中包含验证验证码的流程）
const USER_CHECK_CODE_FAIL = "userCheckCodeFail";
//获取图片验证码成功
const USER_GET_CODE_SUCCESS = "userGetCodeSuccess";
//获取图片验证码失败
const USER_GET_CODE_FAIL = "userGetCodeFail";
//登出成功
const USER_LOGOUT_SUCCESS = "userLogoutSuccess";
//登出失败
const USER_LOGOUT_FAIL = "userLogoutFail";

function init(value) {
  value.g.const.CART_GET_LIST = CART_GET_LIST;
  value.g.const.CART_GET_NUM = CART_GET_NUM;
  value.g.const.CART_SEND_LIST = CART_SEND_LIST;
  value.g.const.CART_SEND_NUM = CART_SEND_NUM;
  value.g.const.CART_DATA_CHANGE = CART_DATA_CHANGE;
  value.g.const.CART_CHANGE_NUM = CART_CHANGE_NUM;
  value.g.const.CART_CHANGE_SELECT = CART_CHANGE_SELECT;
  value.g.const.CART_DELETE_ITEM = CART_DELETE_ITEM;
  value.g.const.CART_ADD_ITEM = CART_ADD_ITEM;
  value.g.const.CART_ADD_THIRD_ITEM = CART_ADD_THIRD_ITEM;
  value.g.const.CART_THIRD_DATA_CHANGE = CART_THIRD_DATA_CHANGE;

  value.g.const.USER_LOGIN_SUCCESS = USER_LOGIN_SUCCESS;
  value.g.const.USER_LOGIN_FAIL = USER_LOGIN_FAIL;
  value.g.const.USER_RIGISTER_SUCCESS = USER_RIGISTER_SUCCESS;
  value.g.const.USER_RIGISTER_FAIL = USER_RIGISTER_FAIL;
  value.g.const.USER_GET_LOGIN_INFO_SUCCESS = USER_GET_LOGIN_INFO_SUCCESS;
  value.g.const.USER_GET_LOGIN_INFO_FAIL = USER_GET_LOGIN_INFO_FAIL;
  value.g.const.USER_CHECK_CODE_SUCCESS = USER_CHECK_CODE_SUCCESS;
  value.g.const.USER_CHECK_CODE_FAIL = USER_CHECK_CODE_FAIL;
  value.g.const.USER_GET_CODE_SUCCESS = USER_GET_CODE_SUCCESS;
  value.g.const.USER_GET_CODE_FAIL = USER_GET_CODE_FAIL;
  value.g.const.USER_LOGOUT_SUCCESS = USER_LOGOUT_SUCCESS;
  value.g.const.USER_LOGOUT_FAIL = USER_LOGOUT_FAIL;
}

module.exports = {
  init: init
}